package com.framework.threadpool.reject;

import com.framework.threadpool.MyThreadPoolExecutor;

/**
 * @author duanzhizhou
 * @date 2025/4/9
 */
public class DiscardStartegy implements RejectHandler{
    @Override
    public void reject(Runnable task, MyThreadPoolExecutor executor) {
        Runnable poll = executor.getQueue().poll();
        System.out.println("丢弃任务" + poll);
        executor.execute(task);
    }
}
